﻿@model Model.OriginalRecord.E_tb_OriginalRecord
@{
    ViewBag.Title = "OriginalRecordEdit";
}
<!DOCTYPE html>

<head>
    <meta name="viewport" content="width=device-width" />
    <title>原始记录信息</title>
    @*<script src="../../Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>*@
</head>
<body>
        @using (Ajax.BeginForm("Save", "OriginalRecord", new AjaxOptions { HttpMethod = "Post", OnSuccess = "handle", OnFailure = "failed" }, new { @id = "frmUpdate" }))
        {
            @Html.HiddenFor(m => m.RecordID, new { @id = "HidRecordID" })
            @Html.HiddenFor(m => m.EditType, new { @id = "HidEditType" })
            @Html.HiddenFor(m => m.FilePath, new { @id = "HidFilePath" })
            @Html.HiddenFor(m => m.DetectPersonnelID, new { @id = "HidDetectPersonnelID" }) <!--通过Js进行赋值-->
            @Html.HiddenFor(m => m.DetectTime, new {@id="HidDetectTime" })
            @Html.HiddenFor(m => m.ProjectID, new { @id = "HidProjectID" })
            @Html.HiddenFor(m => m.SampleID)
            <table border="0" cellpadding="0" cellspacing="0" width="98%" class="DialogTable">
                <tr>
                    <td width="70px" align="right">样品名称：</td>
                    <td align="left" style="width:130px;">@Html.DropDownListFor(m => m.SampleID, ViewData["SampleList"] as SelectList, new { @id = "drop_Sample", @style = "width:160px;", @disabled = "disabled" })</td>
                    <td width="70px" align="right">项目名称：</td>
                    <td align="left" style="width:130px;">@Html.DropDownListFor(m => m.ProjectID, ViewData["ProjectList"] as SelectList, new { @id = "drop_Project", @style = "width:160px;", @disabled = "disabled" })</td>
                    <td width="70px" align="right"></td>
                    <td align="left" style="width:100px;">
                     </td>
                    <td rowspan="2" valign="top" align="right">
                    </td>
                </tr>
                <tr style="display:none;"><td>@Html.DropDownListFor(m => m.TaskNo, ViewData["ExpePlanList"] as SelectList)</td></tr><!--根据需求，去除该列-->
                <tr>
                    @*<td width="70px" align="right">任务单号：</td>
                    <td align="left" style="width:160px;">@Html.DropDownListFor(m => m.TaskNo, ViewData["ExpePlanList"] as SelectList)</td>*@
                    <td width="70px" align="right">检测日期：</td>
                    <td align="left" style="width:120px;">@Html.TextBoxFor(m => m.DetectTime, new { @style = "width:98%;", @id = "txt_DetectTime", @onclick = "WdatePicker()", @disabled = "disabled" })</td>
                    <td width="70px" align="right">备注：</td>
                    <td align="left" colspan="3">@Html.TextBoxFor(m => m.Contents, new { @style = "width:99%;", @id = "txt_Contents" })</td>
                </tr>
                <tr>
                    <td colspan="4">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td width="70px" align="right">检验人：</td>
                                <td align="left" style="width:100px;">
                                    @Html.TextBoxFor(m => m.DetectPersonnelName, new { @style = "width:98%;", @id = "txt_DetectPersonnelName", @disabled = "disabled" })
                                </td>
                                <td width="70px" align="right">检验标准：</td>
                                <td align="left" style="width:150px;">
                                检验标准：@Html.DropDownListFor(m => m.InsStand, ViewData["InsStandList"] as SelectList, new { @style = "width:160px;"})
                                </td>
                                <td align="right"><input type="button" id="Btn_Detect" style="width:80px" value="检验"  onclick="Detect('@ViewBag.DetectPersonnelID    ','@ViewBag.DetectPersonnelName    ')" /></td>
                                <td valign="top" align="right">
                                    <input type="button" id="btn_Save" value="保存" style="width:80px" onclick="$('#frmUpdate').submit()"/>
                                    <a href="/UpFile/@ViewBag.FilePath">导出Execl</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="7" style="height:700px;">
                          <!--阅览OFFICE-->
                          @Html.Raw(ViewBag.EditorHtml)
                    </td>
                </tr>
                
                <tr>
                    <td colspan="7" align="center">
                        <a href="javascript:void(0)" onclick="$('#frmUpdate').submit()"><img src="~/Content/Images/baocun.png" height="20px" /></a>
                        <a href="javascript:void(0)" onclick="Close()"><img src="~/Content/Images/quxiao.png" height="20px" /></a>
                    </td>
                </tr>
            </table>
        }

<script type="text/javascript">
    //检验人赋值
    function Detect(DetectPersonnelID, DetectPersonnelName) {
        $("#HidDetectPersonnelID").val(DetectPersonnelID);
        $("#txt_DetectPersonnelName").val(DetectPersonnelName);
    }
</script>
</body>